return the minimum value of a column given the column header
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(Table), | intent(in) | :: | tab | |||
| character(len=*), | intent(in) | :: | id |
header id |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| type(Column), | public | :: | col | ||||
| integer, | public | :: | i | ||||
| real(kind=float), | public | :: | number |
FUNCTION TableGetMinFromCol & ! ( tab, id ) & ! RESULT (min) ! Module used: USE StringManipulation, ONLY: & ! imported routines: StringToFloat IMPLICIT NONE !arguments with intent (in): TYPE (table), INTENT (IN) :: tab CHARACTER (LEN = *), INTENT (IN) :: id !! header id !local dclarations: REAL (KIND = float) :: min, number TYPE (Column) :: col INTEGER :: i !--------------------------------end of declarations--------------------------- !get the column col = TableGetColByHeader (tab, id) min = HUGE (min) DO i = 1, SIZE (col % row) number = StringToFloat ( col % row (i) ) IF ( number < min ) THEN min = number END IF END DO RETURN END FUNCTION TableGetMinFromCol